:root{
    --background-color: #c3c3c3;
    --background-color-transparent-half: rgba(195,195,195,.5);
    --background-color-transparent: rgba(195,195,195,0);
    --color-font: #111;
}
html{
    background:var(--background-color);
    text-align: center;
    font: 14px sans-serif;
    &[data-loading="true"]{
        overflow: hidden;
        // background:#FFF;
    }
    &[data-output="true"]{
        overflow: hidden;
    }
}
body{
    margin: 0;
}
button{
    cursor: pointer;
}
a{
    color: #666;
    text-decoration: none;
    cursor: pointer;
}
hr{
    border:0;
    border-top:1px solid rgba(0,0,0,.08);
    margin:10px auto;
    max-width: 100px;
    display: block;
}
header{
    padding: 40px 0 30px;
    p{
        opacity: 0.5;
    }
}
.loading-box{
    position: fixed;
    
    top:0;
    right:0;
    left:0;
    bottom:0;
    z-index:1;
    background:#FFF;
    h2{
        line-height: 100px;
        width: 100%;
    }
    animation: loadingBoxopacityIn 4s ease;
    svg{
        width: 320px;
        height: 40px;
        margin:auto;
        position: absolute;
        
    top:0;
    right:0;
    left:0;
    bottom:0;
        opacity: 0;
        animation: opacityIn 3s ease 1s;
    }
}
// .app[data-loading="true"]{
//     .loading-box{
//         display: block;
//     }
// }
@keyframes loadingBoxopacityIn {
    0%,
    90%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}
@keyframes opacityIn {
    0%,
    80%,    
    100% {
        opacity: 0;
    }
    40%,60%{
        opacity: 1;
    }
}
h1{
    margin:0 auto;
    
    // width: 200px;
    // height: 34px;
    // font-size:26px;
    // line-height: 34px;


    width: 300px;
    height: 52px;
    font-size:39px;
    line-height: 52px;

    word-spacing: -1px;
    white-space: nowrap;
    overflow: hidden;
    color:transparent;

    background: url(one-last-image-sans.svg) no-repeat;
    background-size: contain;
}
@media (min-width:800px){
    h1{
        width: 400px;
        height: 68px;
        font-size:52px;
        line-height: 68px;
    }
}

h2{
    margin:0;
}

canvas{
	// background:#FFF;
}
.app{
    max-width:800px;
    margin:0 auto;
    // &[data-runing="true"]{
    //     background: red;
    // }
}
[v-clock]{
    visibility: hidden;
}
.main-box{
    .ctrl-box{
        padding:40px 0;
    }
}
.preview-box{
    position: relative;
    cursor: pointer;
    img,canvas{
        display: block;
        max-width:100%;
        margin:0 auto;
    }
    img{
        position: absolute;
        left: 0;
        right: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity .1s ease;
    }
    canvas{
        
    }
    &[data-diff]{
        img{
            opacity: 1;
        }
    }
    &[data-runing]{
        img{
            opacity: 1;
        }
    }
    --cover-width: 480px;
    &[data-cover="true"]{
        width:var(--cover-width);
        height:var(--cover-width);
        margin:0 auto;
        img,canvas{
            width:var(--cover-width);
            height:var(--cover-width);
            object-fit: cover;
        }
    }
    @media (max-width:480px) {
        --cover-width: 100vw;
    }
}

.generator-btn{
    &:before{
        content: '生成';
    }
}
.app[data-runing="true"]{
    .generator-btn{
        pointer-events: none;
        &:before{
            content: '生成中...';
        }
    }
}
.config-box{
    padding: 40px 0;
    // font-family: monospace;
}
.tips-box{
    padding:14px;
    // font-weight:bold;
    // color:#666;
    p{
        margin:0;
        padding:4px 0;
    }
}
.range-box{
    padding: 4px 0;
    width:320px;
    max-width:100%;
    margin:0 auto;
    font-size:12px;
    .head{
        overflow: hidden;
        b{float: left;}
        span{float: right;}
    }
}
input[type="range"]{
    display: block;
    margin:0 auto;
    width:100%;
}
/* .app[data-cover="true"] canvas{
	width:480px;
	height:480px;
} */
h1{

}
.ui-shadow{
    position: fixed;
    top:0;
    right:0;
    left:0;
    bottom:0;
    z-index:1;
    background:rgba(0,0,0,.5);
    overflow: auto;
    overflow-y: scroll;
    overscroll-behavior: contain;
}
.output-box{
    background:#FFF;
    width: 800px;
    max-width:100%;
    margin:40px auto;
    padding:20px;
    box-sizing: border-box;
    box-shadow: 0 0 40px rgba(0,10,40,.4);
    h2{
        padding-bottom:10px;
    }
    img{
        display: block;
        width:800px;
        max-width:100%;
        box-shadow: 0 0 20px rgba(40,80,200,.2);
        margin:10px 0 40px;
    }
    .ctrl-box{
        padding:10px 0;
    }
}

footer{
    padding:40px 0 80px;
    line-height: 3;
    a{
        display: inline-block;
        padding:0 .5em;
    }
}



[data-text]{
    &:before{
        content:attr(data-text);
    }
}

.ui-tabs-box{
    display: inline-block;
    // margin:10px 0;
    overflow: hidden;
    text-align: center;

    a{
        color: currentColor;
        float: left;
        cursor: pointer;
        line-height: 1;
        padding:6px;
        border-radius:3px;
        transition: color .3s ease, background-color .3s ease;
        &[data-checked="true"]{
            background: currentColor;
            &:before{
                color: #FFF;
            }
        }
    }
}

.ui-switch-box {
    cursor: pointer;
    margin: .2em;

    display: inline-block;
    vertical-align: middle;

    text-align: left;
    .switch {
        display: inline-block;
        vertical-align: middle;

        margin-top: -.3em;
        width: 2.4em;
        height: 1.4em;
        border-radius: 9em;
        background: rgba(0,0,0,.2);
        background: #999;
        transition: background-color .3s ease;
        .slider {
            display: inline-block;
            vertical-align: top;
            width: 1em;
            height: 1em;
            border-radius: 9em;
            background: #FFF;
            margin: .2em;
            position: relative;
            transition: transform .3s ease;
        }
    }
    &[data-checked]{
        .switch {
            background: #000;
            .slider {
                transform: translateX(1em)
            }
        }
    }
    transition: opacity .3s ease;;
    &[data-disabled="true"]{
        opacity: 0.5;
        pointer-events: none;
    }
}

.btn{
    display: inline-block;
    border:0;
    margin:4px;
    font-size:15px;
    line-height: 1.4;
    padding: 10px 16px;
    border-radius: 3px;
    background:#666;
    color:#DDD;
    transition: background-color .3s ease,color .3s ease;
    &.current{
        background: #000;
        color:#EEE;
    }
    &[disabled]{
        background:#999;
        pointer-events: none;
    }
}



.lyric-box{
    --lyric-padding: 100px;
    height: 48px;
    overflow: hidden;
    margin: 20px 0 140px;
    padding: var(--lyric-padding) 0;
    position: relative;
    z-index:0;
    &:before,
    &:after{
        content: '';
        display: block;
        height:var(--lyric-padding);
        position: absolute;
        left:0;
        right:0;
        z-index:1;
    }
    &:before{
        top:0;
        background-image: linear-gradient(
            180deg, 
            var(--background-color), 
            var(--background-color-transparent-half),
            var(--background-color-transparent)
        );
    }
    &:after{
        bottom:0;
        background-image: linear-gradient(
            0deg,
            var(--background-color), 
            var(--background-color-transparent-half),
            var(--background-color-transparent)
        );
    }
    .list{
        transition: transform .3s ease;
    }
    .item{
        box-sizing: border-box;
        height:48px;
        line-height: 20px;
        padding:14px 0;
        &[data-have-cn="true"]{
            padding:4px 0;
        }
        .cn{
            opacity: 0.4;
            font-size:12px;
        }

        transition: opacity .3s ease;
        opacity: 0.3;

        &[data-current="true"]{
            opacity: 1;
        }
    }
}